package dao.impl;

import Service.NewsService;
import dao.NewsDao;
import dao.factory.SimpleDaoFactory;
import pojo.News;

/**
 * @Description
 * @Author 李楚鹏
 * @Date 2024/11/29 10:09
 **/

public class NewsServiceImpl implements NewsService {

    NewsDao newsDao=new NewsDaoImpl();

    private NewsDao dao;
    public void setDao(NewsDao dao){
        this.dao=dao;
    }

    public void addNews(News news){
        dao.save(news);
    }

    @Override
    public void save(News news) {
        dao.save(news);
    }
}
